import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '楼层名称',
    align:"center",
    dataIndex: 'storeyName'
   },
   {
    title: '楼栋',
    align:"center",
    dataIndex: 'buildId'
   },
   {
    title: '楼层号',
    align:"center",
    dataIndex: 'storeyCode'
   },
   {
    title: '楼层描述',
    align:"center",
    dataIndex: 'storeyDesc'
   },
   {
    title: '状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '楼层ID',
    field: 'storeyId',
    component: 'InputNumber'
  },
  {
    label: '楼层号',
    field: 'storeyCode',
    component: 'Input',
  },
  {
    label: '楼层名称',
    field: 'storeyName',
    component: 'Input',
  },
  {
    label: '楼栋',
    field: 'buildId',
    component: 'InputNumber',
  },
  {
    label: '楼层描述',
    field: 'storeyDesc',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"userAble"
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  storeyId: {title: '楼层ID',order: 0,view: 'number', type: 'number',},
  storeyCode: {title: '楼层号',order: 1,view: 'text', type: 'string',},
  storeyName: {title: '楼层名称',order: 2,view: 'text', type: 'string',},
  buildId: {title: '楼栋',order: 3,view: 'number', type: 'number',},
  storeyDesc: {title: '楼层描述',order: 4,view: 'text', type: 'string',},
  status: {title: '状态',order: 5,view: 'radio', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}